package web;

import java.util.Date;
import java.util.List;

import service.GestionConsultation;
import service.GestionReservation;
import dto.LieuVO;
import dto.TrajetVO;
import dto.VoyageVO;

public class GestionVenteBean implements GestionVente {

	private GestionConsultation gestionConsultationDelegate;
	private GestionReservation gestionReservationDelegate;

	public GestionVenteBean() {
	}

	@Override
	public List<LieuVO> getAllLieux() {
		return gestionConsultationDelegate.getAllLieux();
	}

	@Override
	public List<VoyageVO> getAllVoyages() {
		return gestionConsultationDelegate.getAllVoyages();
	}

	@Override
	public VoyageVO getVoyageById(long id){
		return gestionConsultationDelegate.getVoyageById(id);
	}

	@Override
	public List<TrajetVO> getTrajets(String depart, String arrivee, Date allee,
			Date retour) {
		return gestionConsultationDelegate.getTrajets(depart, arrivee, allee,
				retour);
	}

	// injection des business delegates
	public void setGestionConsultationDelegate(
			GestionConsultation gestionConsultationDelegate) {
		this.gestionConsultationDelegate = gestionConsultationDelegate;
	}

	public void setGestionReservationDelegate(
			GestionReservation gestionReservationDelegate) {
		this.gestionReservationDelegate = gestionReservationDelegate;
	}

}
